package org.example.messenger.listener;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;

public class HelloWorldMQAdaptor {

	@Autowired
	private AmqpTemplate template;

	public void setTemplate(AmqpTemplate template) {
		this.template = template;
	}

	public void handleMessage(String text) {

		template.convertAndSend("HELLO_WORLD_OUT", text);

		System.out.println("HelloWorldHandler Received: " + text);
	}
}